package com.xin.mq.listen;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @Author: XinXin
 * @Create: 2024/12/31
 * @Description:
 */
@Component
@RabbitListener(queues = "TestDirectQueue")
public class DirectReceiver {

    @RabbitHandler
    public void process(Map testMessage){
        System.out.println("DirectReceiver消费者收到消息: " + testMessage.toString());
    }
}
